#!/bin/bash
# 注意：这个只是测试数据库，没有加载数据库的过程，要配合在load_db.sh加载完对应数据库之后使用。
start_time=$(date +%s) # %s可以计算的是1970年以来的秒数
cd ../learned-leveldb/

#python ./scripts/plot2_iterationDecay.py 562949954438441
#python ./scripts/plot2_iterationDecay.py 562949963339941
#python ./scripts/plot2_iterationDecay.py 562949972120239

# 最新的大数据集
#python ./scripts/plot2_iterationDecay.py 277575252013355
#python ./scripts/plot2_iterationDecay.py 562950162059083
#python ./scripts/plot2_iterationDecay.py 562950162059084

#python ./scripts/plot2_iterationDecay.py 562949963339941
#python ./scripts/plot2_iterationDecay.py 562949953436138 562949965360787
# 第一步，分析workload
#python ./scripts/plot1_calReadWrite_plotOffset.py

# 第二步，画图,遍历文件夹ebs_segment_dataset
path=../ebs_segment_dataset/
filenames=$(ls $path)

for filename in $filenames; do
  data_name=${filename%.*}
  python ./scripts/plot2_iterationDecay.py $data_name
done

python ./scripts/plot3_mean_and_speedUp.py


end_time=$(date +%s)
cost_time=$((end_time-start_time))
echo "$0" "运行时间：$((cost_time/60))min $((cost_time%60))s"
